﻿//-----------------------------------------------------------------------
// <copyright file="AttachmentGroupFactory.cs" company="Huirui">
//     Copyright Huirui. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Huirui.Cavan.Domain.MainBoundedContext.AttachmentModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public static class AttachmentGroupFactory
    {
        public static AttachmentGroup CreateAttachmentGroup(
                                            string name,
                                            string englishName,
                                            AttachmentIdentifier.FileType fileType,
                                            string fileSuffixs,
                                            string saveFileSuffix,
                                            int fileServer,
                                            bool isNeedCompress,
                                            string compressFormate,
                                            string restrictFormate,
                                            long restrictFileLength,
                                            int restrictFileCount,
                                            string description,
                                            AttachmentIdentifier.AttachmentType attachmentType,
                                            DateTime editTime,
                                            int editUser)
        {
            AttachmentGroup attachmentGroup = new AttachmentGroup();
            attachmentGroup.AttachmentType = attachmentType;
            attachmentGroup.CompressFormate = compressFormate;
            attachmentGroup.Description = description;
            attachmentGroup.ModifyDate = editTime;
            attachmentGroup.EditUser = editUser;
            attachmentGroup.EnglishName = englishName;
            attachmentGroup.FileServer = fileServer;
            attachmentGroup.FileSuffixs = fileSuffixs;
            attachmentGroup.FileType = fileType;
            attachmentGroup.IsNeedCompress = isNeedCompress;
            attachmentGroup.Name = name;
            attachmentGroup.RestrictFileCount = restrictFileCount;
            attachmentGroup.RestrictFileLength = restrictFileLength;
            attachmentGroup.RestrictFormate = restrictFormate;
            attachmentGroup.SaveFileSuffix = saveFileSuffix;
            attachmentGroup.CreateDate = DateTime.Now;

            return attachmentGroup;
        }
    }
}
